package com.wsd.dao;

import java.util.Date;
import java.util.List;

import com.wsd.bean.Articles;

/**
 * @author TuZiJun
 *
 */
public interface ArticlesDaoInterface {
	public void save(Articles transientInstance);

	public void delete(Articles persistentInstance);

	public Articles findById(java.lang.Integer id);

	public List<Articles> findAll();

	/**
	 * @param startDate
	 * @param endDate
	 * @param start
	 * @param limit
	 * @return
	 */
	public List<Articles> history(Date startDate, Date endDate, int start, int limit);

	/**
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	public int historyCount(Date startDate, Date endDate);

	/**
	 * @param id
	 */
	public void delete(int id);

	/**
	 * @param preArticle
	 */
	public void update(Articles preArticle);

	/**
	 * @param start
	 * @param limit
	 */
	public List<Articles> findAll(int start, int limit);

	/**
	 * @param article
	 * @param start
	 * @param limit
	 */
	public List<Articles> findAll(Articles article, int start, int limit);

	/**
	 * @param article
	 * @return
	 */
	public int findAllCount(Articles article);

	/**
	 * @return
	 */
	public int findAllCount();

	/**
	 * @param model
	 * @return
	 */
	public int getTotalLines(int model);

	/**
	 * @param start
	 * @param pagesize
	 * @param model
	 * @return
	 */
	public List<Articles> findByModel(int start, int pagesize, int model);
}
